home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr32 / tbav602.zip / TBSCAN.DOC < prev    next >
Text File  |  1993-05-04  |  91KB  |  2,221 lines

  1.  
  2.  
  3.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  4.  
  5.  
  6.                                Table of Contents
  7.  
  8.  
  9.     1. INTRODUCTION...................................... 2
  10.         1.1. Purpose of TbScan........................... 2
  11.         1.2. A Quick start............................... 2
  12.         1.3. Historical overview......................... 2
  13.         1.4. Benefits.................................... 3
  14.             1.4.1. Speed................................. 4
  15.             1.4.2. Reliability........................... 4
  16.             1.4.3. Smart scanning........................ 5
  17.         1.5. Limitations of scanners..................... 6
  18.  
  19.     2. USAGE OF THE PROGRAM.............................. 7
  20.         2.1. System requirements......................... 7
  21.         2.2. Program invocation.......................... 7
  22.         2.3. While scanning.............................. 7
  23.         2.4. Detecting viruses........................... 8
  24.         2.5. Integrity checking......................... 10
  25.         2.6. Heuristic scanning......................... 10
  26.             2.6.1. False positives...................... 12
  27.             2.6.2. C - File has been changed............ 13
  28.             2.6.3. c - No integrity check............... 13
  29.             2.6.4. F - Suspicious file access........... 13
  30.             2.6.5. R - Suspicious relocator............. 13
  31.             2.6.6. A - Suspicious Memory Allocation..... 14
  32.             2.6.7. N - Wrong name extension............. 14
  33.             2.6.8. S - Search for executables........... 14
  34.             2.6.9. ..................................... 14
  35.             2.6.10. V - Validated program............... 14
  36.             2.6.11. E - Flexible Entry-point............ 14
  37.             2.6.12. L - program Load trap............... 15
  38.             2.6.13. D - Direct disk access.............. 15
  39.             2.6.14. M - Memory resident code............ 15
  40.             2.6.15. .................................... 16
  41.             2.6.16. T - Invalid timestamp............... 16
  42.             2.6.17. J - Suspicious jump construct....... 16
  43.             2.6.18. ? - Inconsistent header............. 16
  44.             2.6.19. G - Garbage instructions............ 16
  45.             2.6.20. U - Undocumented system call........ 17
  46.             2.6.21. Y - Invalid bootsector.............. 17
  47.             2.6.22. Z - EXE/COM determinator............ 17
  48.             2.6.23. O - code Overwrite.................. 17
  49.             2.6.24. B - Back to entry................... 17
  50.             2.6.25. K - Unusual stack................... 18
  51.             2.6.26. p - Packed or compressed file....... 18
  52.             2.6.27. w - Windows or OS/2 header.......... 18
  53.             2.6.28. h - Hidden or System file........... 18
  54.             2.6.29. i - Internal overlay................ 18
  55.         2.7. Program validation......................... 19
  56.         2.8. Command line options....................... 19
  57.             2.8.1. help ................................ 20
  58.  
  59.  
  60.  
  61.                                      Page i
  62.  
  63.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  64.  
  65.  
  66.             2.8.2. pause ............................... 20
  67.             2.8.3. mono ................................ 20
  68.             2.8.4. quick ............................... 20
  69.             2.8.5. allfiles ............................ 21
  70.             2.8.6. heuristic ........................... 21
  71.             2.8.7. extract ............................. 21
  72.             2.8.8. once ................................ 21
  73.             2.8.9. secure .............................. 22
  74.             2.8.10. compat ............................. 22
  75.             2.8.11. ignofile ........................... 22
  76.             2.8.12. noboot ............................. 22
  77.             2.8.13. nomem .............................. 22
  78.             2.8.14. hma ................................ 22
  79.             2.8.15. nohmem ............................. 22
  80.             2.8.16. nosub .............................. 22
  81.             2.8.17. noautohr ........................... 23
  82.             2.8.18. delete ............................. 23
  83.             2.8.19. rename ............................. 23
  84.             2.8.20. move ............................... 23
  85.             2.8.21. path ............................... 23
  86.             2.8.22. batch .............................. 24
  87.             2.8.23. repeat ............................. 24
  88.             2.8.24. log ................................ 24
  89.             2.8.25. session ............................ 24
  90.             2.8.26. loglevel ........................... 24
  91.             2.8.27. expertlog .......................... 25
  92.         2.9. Examples:.................................. 25
  93.         2.10. The configuration file.................... 25
  94.         2.11. The TbScan.Lng file....................... 26
  95.         2.12. Error messages............................ 27
  96.         2.13. Exit codes................................ 28
  97.  
  98.     3. CONSIDERATIONS AND RECOMMENDATIONS............... 29
  99.         3.1. What should be scanned?.................... 29
  100.         3.2. The internals of TbScan.................... 30
  101.             3.2.1. How is that blazing speed achieved?.. 30
  102.             3.2.2. The algorithms....................... 31
  103.                 3.2.2.1. Looking........................ 31
  104.                 3.2.2.2. Checking....................... 31
  105.                 3.2.2.3. Tracing........................ 31
  106.                 3.2.2.4. Scanning....................... 32
  107.                 3.2.2.5. Skipping....................... 32
  108.         3.3. The Sanity check........................... 32
  109.         3.4. How many viruses does it detect?........... 33
  110.         3.5. Testing the scanner........................ 33
  111.         3.6. Scan scheduling............................ 33
  112.         3.7. Compressed files........................... 34
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.                                     Page ii
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.                                      Page 1
  182.  
  183.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  184.  
  185.  
  186. 1.  INTRODUCTION
  187.  
  188.  
  189.   1.1.  Purpose of TbScan
  190.  
  191.     TbScan is a virus scanner: it has been specifically developed to
  192.     detect viruses, Trojan Horses and other such threats to your
  193.     valuable data.
  194.  
  195.     A virus scanner is a program that is able to detect given virus
  196.     signatures in given environments. Most viruses consist of a unique
  197.     sequence of instructions, called a signature. Hence through
  198.     checking for the appearance of such signatures in a file we can
  199.     find out whether or not a program has been infected.
  200.  
  201.     Scanning all your program files for the signatures of all known
  202.     viruses helps you to find out quickly whether or not your system
  203.     has been infected and, if so, by what virus.
  204.  
  205.     Every PC owner should use a virus scanner frequently. It is the
  206.     least he or she should do to avoid damage caused by a virus.
  207.  
  208.  
  209.   1.2.  A Quick start
  210.  
  211.     Although we highly recommend a complete reading of this manual, we
  212.     offer you some directions for a quick run of TbScan here:
  213.  
  214.     Type 'TbScan C:\' at the DOS prompt. This will be sufficient for a
  215.     standard scan session. It is allowed to specify more drives:
  216.     'TbScan C:\ D:\'.
  217.  
  218.     The invocation syntax is:
  219.  
  220.             TBSCAN [@][<path>][<filename>]... [<options>]...
  221.  
  222.     If your system does not allow TbScan to run properly, set the
  223.     'compat' option: TBSCAN C:\ compat
  224.  
  225.     For fast online help type 'TbScan ?' or 'TbScan help'. The latter
  226.     will provide for a more detailed description of the command line
  227.     options.
  228.  
  229.  
  230.   1.3.  Historical overview
  231.  
  232.     Some years ago the PC community was confronted by a new phenomenon:
  233.     Computer viruses. In the early days of computer viruses one had to
  234.     examine each file separately for a single viral code pattern. It
  235.     didn't take long before programmers created small programs that
  236.     were able to tell whether or not a specified program had been
  237.     infected.
  238.  
  239.  
  240.  
  241.                                      Page 2
  242.  
  243.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  244.  
  245.  
  246.     Enhanced versions of these programs were able to search all files
  247.     automatically, still checking for a single viral code. In a short
  248.     period of time many such scanners were written, each capable of
  249.     detecting a specified virus signature.
  250.  
  251.     As the number of viruses kept on increasing, programmers started to
  252.     combine several scan programs into one: the multi-string scanner
  253.     was born. These early scanners worked properly, but could not last.
  254.     As the amount of viruses was rapidly growing, a scanner was
  255.     outdated soon.  Simultaneously the number of multi-string scanning
  256.     programs also increased, and scanning programs began detecting each
  257.     other's internal search patterns (signatures), wrongly informing
  258.     the user of a virus infection. Naturally a lot of people got
  259.     confused by these false alarms.
  260.  
  261.     A solution to these problems was to separate the search engine from
  262.     the signatures it would search for. The separate signature data
  263.     files that were the result could be updated and distributed much
  264.     faster through text media. Secondly, by separating the search
  265.     patterns from the executable file, a scanner would no longer
  266.     trigger false alarms.
  267.  
  268.     TbScan used originally the signature file VIRSCAN.DAT, originally 
  269.     created for a program called VIRSCAN.EXE. When VIRSCAN.EXE was 
  270.     developed, the number of viruses was relatively small. However, 
  271.     when the number of viruses increased, the Virscan program slowed 
  272.     down considerably as a result of signature additions.
  273.  
  274.     At that time we developed the Thunderbyte add-on card, a universal
  275.     anti-virus device. Since the Thunderbyte card recognizes virus
  276.     activities rather than signatures, it will establish whether or not
  277.     a system has been infected, but it will not identify the virus
  278.     itself. To provide for such identification we decided to supply a
  279.     virus scanner along with our anti-virus hardware product, and we
  280.     developed TbScan.
  281.  
  282.     When the number of viruses increased the VirScan.Dat file was no 
  283.     longer suitable anymore, and we developed our own signature file
  284.     TbScan.Sig.
  285.  
  286.     We introduced many very sophisticated ideas in the first version of 
  287.     TbScan, such as: the use of wildcards in the signature, scanning 
  288.     the memory of your PC, scanning only specific parts of a file 
  289.     rather than the complete file, partially disassemble the file being 
  290.     scanned, etc.  Today, many competitive products have adopted some 
  291.     of these new ideas.
  292.  
  293.  
  294.   1.4.  Benefits
  295.  
  296.     By now many different virus scanners have been developed.  However,
  297.     TbScan has a number of important and unique advantages over other
  298.  
  299.  
  300.  
  301.                                      Page 3
  302.  
  303.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  304.  
  305.  
  306.     scanners. These are:
  307.  
  308.     1.4.1.  Speed
  309.  
  310.         Most virus scanners do not operate very fast, which means that
  311.         scanning your PC for viruses can be a tedious, time-consuming
  312.         affair. Not many people will enjoy staring at their display for
  313.         a quarter of an hour or more while their system is being
  314.         scanned.  Consequently many people do not run their virus
  315.         scanners as often as they should. Under those circumstances
  316.         even the best virus scanner will become obsolete, simply
  317.         because it is not being used properly.
  318.  
  319.         Hence it was our goal to create a scanner fast enough to invite
  320.         users to invoke it from within their AUTOEXEC.BAT file every
  321.         morning.
  322.  
  323.         The speed depends on many system characteristics, so we will
  324.         not tell you how many times faster TbScan performs, but you
  325.         will easily find out yourself. The speed of our program has
  326.         been increased with almost every new release, and the current
  327.         version is faster than any other scanner known to us. Try it
  328.         yourself!
  329.  
  330.         TbScan is designed to scan for a large amount of virus
  331.         signatures. The current version of TbScan is able to scan for
  332.         over 2500 signatures (without additional memory requirements).
  333.         Because of its design, TbScan will not slow down if the number
  334.         of signatures increases. It doesn't matter whether you scan an
  335.         item for 10 or 1000 signatures.
  336.  
  337.     1.4.2.  Reliability
  338.  
  339.         TbScan checks itself on invocation. If it detects that it has
  340.         been infected it aborts with an error. This minimizes the risk
  341.         that the TbScan program itself will transfer a virus and so
  342.         infect your system.
  343.  
  344.         TbScan can also detect yet unknown viruses, because the
  345.         built-in disassembler is able to detect suspicious instruction
  346.         sequences and abnormal program lay-outs. This feature is
  347.         called 'heuristic scanning' and it is partially enabled by
  348.         default. Heuristic scanning is performed on files and
  349.         bootsectors, so for both items TbScan is able to find new and
  350.         yet unknown viruses.
  351.  
  352.         A lot of viruses are memory resident, which means that they
  353.         lodge themselves in the memory of your computer. There they can
  354.         comfortably affect all active programs. There are even 'smart'
  355.         viruses that temporarily 'disinfect' a program file, as soon as
  356.         they notice that attempts are made to read the program file as
  357.         is the case during a scanning operation. Most virus scanners
  358.  
  359.  
  360.  
  361.                                      Page 4
  362.  
  363.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  364.  
  365.  
  366.         will then find that this program file has not been infected
  367.         (which is true at the time of scanning!). But after the
  368.         scanner has completed its scan the virus becomes operant, again
  369.         ridiculing the scanner report that no virus has been found.
  370.  
  371.         TbScan can bypass viruses that are already active in memory.
  372.         This is possible because TbScan does not use DOS to read the 
  373.         files, but instead, TbScan interprets the File Allocation Table 
  374.         and reads all files directly from disk. 
  375.  
  376.         TbScan is able to scan Upper Memory, Video Memory and the HMA.
  377.         Many of the other scanners (still) don't recognize this memory.
  378.  
  379.         TbScan scans the video memory of your PC. Most anti-virus
  380.         products are not aware of the fact that it is possible to
  381.         install TSR programs (including viruses) in unused parts of
  382.         your video memory. TbScan scans all memory, including the video
  383.         memory, just to make sure.
  384.  
  385.         TbScan is able to detect mutants of a virus. A mutant is a
  386.         virus that has been modified slightly and therefore does not
  387.         match the original signature anymore. TbScan is able to detect
  388.         such a mutant, even if no wildcards are used in the virus
  389.         signature.
  390.  
  391.         TbScan is able to detect droppers of bootsector viruses. The
  392.         dropper program itself has not been infected, but it is there
  393.         to install the bootsector virus in your system.
  394.  
  395.         TbScan also checks for file changes if you have used TbSetup to
  396.         generate the Anti-Vir.Dat files. When a virus infects a file,
  397.         the file changes and therefore the checksum does not match
  398.         anymore. TbScan informs you about such an unexpected file
  399.         change.
  400.  
  401.     1.4.3.  Smart scanning
  402.  
  403.         TbScan is not just a scanner, it is a disassembling scanner.
  404.         This means that TbScan not only scans the file but also
  405.         interprets the contents and adjusts the scanning algorithm to
  406.         gain the highest reliability and speed. By reliability we do
  407.         not only mean a low 'false negative' ratio, but a low 'false
  408.         positive' ratio as well. No one needs a scanner that yells
  409.         'virus!' all the time. A good scanner should only yell 'virus!'
  410.         if there really IS a virus to be found in a file.
  411.  
  412.         Apart from the capability of adjusting the scanning algorithm,
  413.         TbScan also displays additional information about the file
  414.         itself.  It can detect instruction sequences that are intended
  415.         to cause direct disk writes, to make program code resident, to
  416.         decrypt code, etc. TbScan even flags files as being infected by
  417.         an unknown virus if the disassembly shows that the file must
  418.  
  419.  
  420.  
  421.                                      Page 5
  422.  
  423.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  424.  
  425.  
  426.         contain a virus even though a matching signature cannot be
  427.         found. This process is called "heuristic analysis". All this 
  428.         information is displayed while a scan is being performed!
  429.  
  430.         TbScan offers registered users the possibility to define their
  431.         own signatures through the 'extract' option. You don't have to
  432.         be an assembler programmer anymore, if a signature has to be
  433.         defined in an emergency situation!
  434.  
  435.  
  436.   1.5.  Limitations of scanners
  437.  
  438.     Although TbScan is a very sophisticated scanner, it shares some of
  439.     the limitations that all other scanners have:
  440.  
  441.     +   It cannot prevent infection.
  442.  
  443.         Virus scanners can only tell you whether or not your system has
  444.         been infected and if so, whether any damage has already been
  445.         done. By that time only a non-infected backup or a recovery pro-
  446.         gram such as TbClean will properly counter a virus infection.
  447.  
  448.     +   It cannot execute itself.
  449.  
  450.         You will have to be active in taking measures to protect your
  451.         system from virus infection. You should boot from a clean and
  452.         write-protected diskette and then execute the scanner at least
  453.         once every week, since some viruses can perfectly hide
  454.         themselves once resident in memory. Unfortunately it is an
  455.         illusion to think that employees will perform this task
  456.         correctly at all times. For company use we recommend additional
  457.         protection, in the shape of a permanently active immunizer such
  458.         as the Thunderbyte add-on card.
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.                                      Page 6
  482.  
  483.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  484.  
  485.  
  486. 2.  USAGE OF THE PROGRAM
  487.  
  488.  
  489.   2.1.  System requirements
  490.  
  491.     TbScan runs perfectly on standard machines, in line with our
  492.     philosophy that there should be a limit to limitations.
  493.  
  494.     +   TbScan requires 200 Kb of free memory. If you decide to use a
  495.         log file TbScan will need an additional 16 Kb of memory for the
  496.         log file buffer. If TbScan uses its own built-in file system it 
  497.         uses additional memory to keep the FAT in memory.
  498.  
  499.         Note that the memory requirements are independent of the number 
  500.         of signatures. The current memory requirements suffice to 
  501.         manage at least 2500 signatures.
  502.  
  503.     +   TbScan can be executed under DOS version 3.00 (and all later
  504.         versions). However, Dos 3.3 or higher is recommended, since
  505.         TbScan has been optimized and designed primarily for use with
  506.         these DOS versions.
  507.  
  508.  
  509.   2.2.  Program invocation
  510.  
  511.     TbScan is easy to use. The syntax is as follows:
  512.  
  513.             TBSCAN [@][<path>][<filename>]... [<options>]...
  514.  
  515.     Drive and path tell TbScan where it should perform its scanning
  516.     operation. To search disks C: and D: you should enter:
  517.  
  518.             TBSCAN C:\ D:\
  519.  
  520.     When no filename has been specified but a drive and/or path
  521.     instead, the specified path will be used as top-level path.  All
  522.     its subdirectories will be processed too.
  523.  
  524.     When a filename has been specified only the specified path will be
  525.     searched. Subdirectories will not be processed.
  526.  
  527.     Wildcards in the filename are allowed. You may even specify '*.*'
  528.     which will result in all files being processed.
  529.  
  530.     You can also tell TbScan to use a list file. A list file is a file
  531.     that contains a list of paths/filenames to be scanned.  Have the
  532.     filename preceded by the character '@' on the TbScan command line:
  533.  
  534.             TBSCAN @TBSCAN.LST
  535.  
  536.  
  537.   2.3.  While scanning
  538.  
  539.  
  540.  
  541.                                      Page 7
  542.  
  543.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  544.  
  545.  
  546.     TbScan divides the screen into three windows: an information
  547.     window, a scanning window and a status window. The upper window is
  548.     the information window and it initially displays the comments found
  549.     in the data file.
  550.  
  551.     If TbScan detects infected files the names of the file and the
  552.     virus will be displayed in the upper window. The information will
  553.     stack up and scroll off the screen if it doesn't fit anymore.
  554.  
  555.     The lower left window displays the names of the files being
  556.     processed, the algorithm in use, info and heuristic flags,
  557.     and finally an OK statement or the name of the virus
  558.     detected.
  559.  
  560.     Example:
  561.     TEST.EXE   <Scanning...>  FR        OK
  562.        |          |           |         |
  563.        |          |           |         result of scan
  564.        |          |           heuristic flags
  565.        |          algorithm being used to process file
  566.        name of file in process
  567.  
  568.     You will see comments following each file name:
  569.     'Looking', 'Checking', 'Tracing', 'Scanning' or 'Skipping'. These 
  570.     refer to the various algorithms being used to scan files.
  571.  
  572.     Other comments that TbScan can display here are the heuristic
  573.     flags.  Consult the 'Heuristic flags' chapter (3.5) for more
  574.     information on these warning characters.
  575.  
  576.     The lower right window is the status window. It displays the number
  577.     of files and directories encountered, the amount of viruses found,
  578.     etc. It also displays which file system is being used: either "DOS" 
  579.     or "OWN". The latter means that TbScan is able to bypass DOS and 
  580.     reads all files directly from disk for extra security and speed.
  581.  
  582.     The process can be aborted by pressing Ctrl-Break.
  583.  
  584.  
  585.   2.4.  Detecting viruses
  586.  
  587.     As soon as an infected program is found, the name of the virus will
  588.     be displayed. If you did not specify one of the options 'batch',
  589.     'rename', 'delete' or 'move', TbScan will prompt you to delete,
  590.     rename or move the infected file, or to continue without action. If
  591.     you choose to rename the file, the first character of the extension
  592.     will be replaced by the character 'V'. This prevents the file from
  593.     being executed accidentally before it has been investigated more
  594.     thoroughly. If you choose to move the file, the file will be moved
  595.     to the TbScan directory or to the directory specified by option
  596.     'path'.
  597.  
  598.  
  599.  
  600.  
  601.                                      Page 8
  602.  
  603.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  604.  
  605.  
  606.     In some situations TbScan will offer you an additional menu option:
  607.     V)alidate program. For more information about this menu option
  608.     consult option 'Program validation'.
  609.  
  610.  
  611.     When TbScan detects an infected file it will display a message like:
  612.  
  613.         Infected by [name of virus] virus
  614.  
  615.     Several texts can precede the name of the virus:
  616.  
  617.         Infected by [name of virus] virus
  618.                 The file is infected by the virus mentioned.
  619.  
  620.         Dropper of [name of virus]
  621.                 A dropper is a program that has not been infected 
  622.                 itself, but which does contain a bootsector virus and 
  623.                 is able to install it in your bootsector.
  624.  
  625.         Damaged by [name of virus]
  626.                 Some viruses damage files. A damaged file contains - 
  627.                 unlike an infected file - not the virus itself, but has 
  628.                 been damaged by the virus.
  629.  
  630.         Overwritten by [name of virus]
  631.                 Some viruses overwrite files. An overwritten file 
  632.                 contains - unlike an infected file - not the virus 
  633.                 itself, but has been overwritten with garbage.
  634.  
  635.         Is Trojan named [name of Trojan]
  636.                 The file is a Trojan Horse. Do not execute the program 
  637.                 but delete it.
  638.  
  639.         Is Joke named [name of Joke]
  640.                 There are some programs wich simulate the system is 
  641.                 infected by a virus. A joke is completely harmless.
  642.  
  643.     It is also possible that TbScan encounters a file that seems to be
  644.     infected by a virus, although a signature could not be found. In
  645.     this case TbScan displays the prefix 'Probably' before the message.
  646.  
  647.     If you have specified option 'heuristic' it is likely that TbScan 
  648.     will find some files which looks like a virus, and in this case 
  649.     TbScan uses the prefix 'Might be' to inform you about it.  So, if 
  650.     TbScan displays Might be infected by [name of virus] it does not 
  651.     mean that the file is infected, but just that the file might be 
  652.     infected by a virus. There are a lot of files that look like a 
  653.     virus but they aren't.
  654.  
  655.     TbScan needs access to its data file to be able to tell you the
  656.     name of a virus. If it cannot access the data file it displays the
  657.     message [Cannot read datafile] instead of a virus name.
  658.  
  659.  
  660.  
  661.                                      Page 9
  662.  
  663.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  664.  
  665.  
  666.  
  667.   2.5.  Integrity checking
  668.  
  669.     TbScan will also perform integrity checking while scanning. You
  670.     have to use TbSetup to generate the Anti-Vir.Dat files. Once these
  671.     files exist on your system TbScan will check that every file being
  672.     scanned matches the information maintained in the Anti-Vir.Dat
  673.     files. If a virus infects a file, the maintained information will
  674.     not match anymore with the now changed file, and TbScan will inform
  675.     you about this. There are no command line options to enable this
  676.     feature: TbScan will perform integrity checking automatically
  677.     if it detects the Anti-Vir.Dat files. Note that TbScan only reports
  678.     file changes that could indicate a virus. Internal configuration
  679.     areas of program files may also change, but TbScan does normally
  680.     not report this. However, if a file gets infected with any virus -
  681.     known or unknown - the vital information will change and TbScan
  682.     will indeed report it to you!
  683.  
  684.     It is however possible that the checked file changes itself or
  685.     changes frequently due to another cause. In this case you might
  686.     want to exclude the program from integrity checking to avoid future
  687.     false alarms. TbScan will offer you an additional menu option:
  688.     'V)alidate program'. For more information about this menu option
  689.     consult option 'Program validation'.
  690.  
  691.  
  692.   2.6.  Heuristic scanning
  693.  
  694.     TbScan is not just a signature scanner. It also disassembles the
  695.     file being processed. This serves three purposes:
  696.  
  697.     1) By disassembling the file the scanner can restrict itself to the
  698.        area of the file where the virus might reside, reducing false
  699.        alarms and speeding up the process.
  700.     2) It makes it possible to use the algorithmic detection method on
  701.        encrypted viruses whose signatures would otherwise remain
  702.        invisible to the scanner.
  703.     3) And it makes it possible to detect suspicious instruction
  704.        sequences.
  705.  
  706.     The detection of suspicious instruction sequences is named
  707.     'heuristic scanning'. It is a very powerful feature that enables
  708.     you to detect new or modified viruses and to verify the results of
  709.     the signature scan. You no longer have to rely on the vendor of the
  710.     scanner having the same virus as you might have. In normal cases a
  711.     scanner can only find a virus if the developer of the scanner has
  712.     had a sample of that virus, to be able to make a suitable
  713.     signature. With heuristic scanning a signature is no longer
  714.     required, so the scanner can detect viruses that are not known to
  715.     the developer of the scanner. You should not underestimate the
  716.     importance of heuristic scanning, as every month there appear at
  717.     least 50 new viruses. It is very unlikely that the developer of a
  718.  
  719.  
  720.  
  721.                                     Page 10
  722.  
  723.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  724.  
  725.  
  726.     scanner is the first one that gets those new viruses...
  727.  
  728.     How does heuristic scanning actually work? Every program contains
  729.     instructions for the processor of the PC. By looking into the file
  730.     contents and by interpreting the instructions TbScan is able to
  731.     detect the purpose of these instructions. If the purpose seems to
  732.     be to format a disk, or to infect a file, TbScan issues a
  733.     warning. There are a lot of instruction sequences which are very
  734.     common for viruses, but very unlikely for normal programs. Every
  735.     suspicious instruction sequence is assigned to a character: a
  736.     heuristic flag. Every heuristic flag has a score. If the total
  737.     score exceeds a predefined limit, TbScan assumes the file contains
  738.     a virus.
  739.  
  740.     There are actually two predefined limits: the first one is quite
  741.     sensitive and can be reached by some normal innocent programs. If
  742.     this limit is reached, TbScan highlights the heuristic flags that
  743.     are displayed on the screen and increases the 'suspected items'
  744.     counter, but TbScan does not indicate there is a virus, unless you
  745.     have specified option 'heuristic'. If you have specified option
  746.     'heuristic', TbScan tells you that the file 'Might be infected by
  747.     an unknown virus'. The second heuristic-limit will be triggered by
  748.     a lot of viruses, but not by normal programs. If this limit is
  749.     reached TbScan tells you that the file is 'Probably infected by an
  750.     unknown virus.'
  751.  
  752.  
  753.     Heuristic level 1                  Heuristic level 2
  754.     --------------------------------   ----------------------------
  755.     Always enabled                     Only with option 'heuristic'
  756.                                        or after a virus has been
  757.                                        found.
  758.     Detects 50% of the unknown viruses Detects 90% of the viruses
  759.     Almost never causes false alarms   Causes a few false alarms
  760.     Displays 'Probably infected'       Displays 'Might be infected'
  761.  
  762.  
  763.     TEST.EXE <scanning...>      OK           (no flags)
  764.     TEST.EXE <scanning...> R    OK           (nothing serious)
  765.     TEST.EXE <scanning...> FRM
  766.      might be infected by an unknown virus   (reached level 2)
  767.     TEST.EXE <scanning...> FRALM#
  768.      probably infected by an unknown virus   (reached level 1)
  769.  
  770.  
  771.     Note that unlike other scanners, TbScan has heuristic scanning
  772.     always enabled. Whether TbScan decides to inform the user of
  773.     a possible virus depends on the heuristic score, unless option
  774.     'heuristic' has been specified.
  775.  
  776.     Heuristic flags consist of single characters that are printed behind
  777.     the name of the file that has been processed. There are two kinds
  778.  
  779.  
  780.  
  781.                                     Page 11
  782.  
  783.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  784.  
  785.  
  786.     of flags: the informative ones are printed in lower-case
  787.     characters, and the more serious flags are printed in upper-case
  788.     characters. The lower-case flags are indicative of special
  789.     characteristics of the file being processed, whereas the upper-case
  790.     warnings may indicate a virus. If the 'loglevel' is 3 or above, the
  791.     important warnings will not only appear as a warning character, but
  792.     there will also be a description printed in the log file.
  793.  
  794.     How should you treat the flags? The less important lower-case
  795.     flags can be considered to be for your information only. They
  796.     provide you with file information you might find interesting.  The
  797.     more serious warning flags printed in upper-case MIGHT point
  798.     towards a virus. It is quite normal that you have some files in
  799.     your system which trigger an upper-case flag.
  800.  
  801.     Anyway, if TbScan does not highlight a combination of warnings you
  802.     should not pay too much attention to these flags. For more than 90%
  803.     of the viruses TbScan will highlight the flags (or even indicates
  804.     the file as infected if option 'heuristic' is specified), so it is
  805.     unlikely that a file which only has some flags set really contains
  806.     a virus.
  807.  
  808.     Note!
  809.     TbScan performs heuristic analysis only nearby the entry-point of a
  810.     file, so it is normal that TbScan does not detect that some disk
  811.     utilities write to disk directly, and it is normal that TbScan does
  812.     not detect that some programs are TSR programs. This is just the
  813.     result of one approach to minimize false alarms. In case of a
  814.     virus, the offending instructions are always nearby the entry-point
  815.     (except when the virus is over 10Kb in size) so TbScan will detect
  816.     the suspicious facts in these situations anyway.
  817.  
  818.   2.6.1.  False positives.
  819.  
  820.     Important!
  821.  
  822.     False alarms are part of the nature of heuristic scanning. In
  823.     default mode it is very unlikely that TbScan issues a false alarm.
  824.     However, if you have specified option 'heuristic' some false alarms
  825.     might occur. How to deal with these false alarms? If TbScan thinks
  826.     it has found a virus it tells you the reason for this suspicion. In
  827.     most cases you will be able to evaluate these reasons when you
  828.     consider the purpose of the suspected file.
  829.  
  830.     Note that viruses infect other programs. It is highly unlikely that
  831.     you will find only a few infected files on a hard disk used
  832.     frequently. You should ignore a the result of a heuristic scan if
  833.     only a few programs on your hard disk trigger it. But, if your
  834.     system behaves in a 'strange' manner and many programs cause TbScan
  835.     to issue an alarm with the same serious flags, your system could
  836.     very well be infected by a (yet unknown) virus.
  837.  
  838.  
  839.  
  840.  
  841.                                     Page 12
  842.  
  843.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  844.  
  845.  
  846.     If TbScan finds a file to be very suspicious and pops up with the
  847.     virus alert window, you can avoid future false alarms by pressing
  848.     'V' (Validate program). Note that this only works if there is an
  849.     Anti-Vir.Dat record of the file available. Once a program is
  850.     validated it will no longer be subject to heuristic analyzis,
  851.     unless the program changes and does not match the Anti-Vir.Dat
  852.     record anymore. This will be the case if such a file gets infected
  853.     afterwards, so TbScan will still report infections on these files.
  854.     Note that a validated program is still subject to the conventional
  855.     signature scanning.
  856.  
  857.  
  858.   2.6.2.  C - File has been changed.
  859.  
  860.     This warning can only appear if you used TbSetup to generate the
  861.     Anti-Vir.Dat files. If this warning appears this means that the
  862.     file has been changed. If you did not upgrade the software it is
  863.     very likely that a virus infected the file! Note that TbScan does
  864.     not display this warning if only some internal configuration area
  865.     of the file changes. This warning means that code at the program
  866.     entry point, the entry-point itself and/or the file size have been
  867.     changed.
  868.  
  869.   2.6.3.  c - No integrity check.
  870.  
  871.     This warning indicates that no checksum/recovery information has
  872.     been found about the indicated file. It is highly recommended to
  873.     use TbSetup in this case to store information of the mentioned
  874.     file. This info can later be used for integrity checking and to
  875.     recover from virus infections.
  876.  
  877.   2.6.4.  F - Suspicious file access.
  878.  
  879.     TbScan has found instruction sequences common to infection schemes
  880.     used by viruses. This flag will appear with those programs that
  881.     are able to create or modify existing files.
  882.  
  883.   2.6.5.  R - Suspicious relocator.
  884.  
  885.     Flag 'R' refers to a suspicious relocator. A relocator is a
  886.     sequence of instructions that changes the proportion of CS:IP. It
  887.     is often used by viruses, especially COM type infectors. Tests on a
  888.     large collection of viruses show that TbScan issues this flag for
  889.     about 65% of all viruses. Those viruses have to relocate the CS:IP
  890.     proportion because they have been compiled for a specific location
  891.     in the executable file; a virus that infects another program can
  892.     hardly ever use its original location in the file as it is appended
  893.     to this file. Sound programs 'know' their location in the
  894.     executable file, so they don't have to relocate themselves. On
  895.     systems that operate normally only a small percentage of the
  896.     programs should therefore cause this flag to be displayed.
  897.  
  898.  
  899.  
  900.  
  901.                                     Page 13
  902.  
  903.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  904.  
  905.  
  906.   2.6.6.  A - Suspicious Memory Allocation.
  907.  
  908.     The program uses a non-standard way to search for, and/or allocate
  909.     memory. A lot of viruses try to hide themselves in memory so they use
  910.     a non-standard way to allocate this memory. Some programs
  911.     (high-loaders or diagnostic software) also use non-standard ways
  912.     to search or allocate memory.
  913.  
  914.   2.6.7.  N - Wrong name extension.
  915.  
  916.     Name conflict. The program carries the extension .EXE but appears
  917.     to be an ordinary .COM file, or it has the extension .COM but the
  918.     internal layout of an .EXE file. TbScan does not take any risk in
  919.     this situation, but scans the file for both EXE and COM type
  920.     signatures. A wrong name extension might in some cases indicate a
  921.     virus, but in most cases it doesn't.
  922.  
  923.   2.6.8.  S - Search for executables.
  924.  
  925.     The program searches for *.COM or *.EXE files. This by itself does
  926.     not indicate a virus, but it is an ingredient of most viruses anyway
  927.     (they have to search for suitable files to spread themselves).  If
  928.     accompanied by other flags, TbScan will assume the file is infected
  929.     by a virus.
  930.  
  931.   2.6.9.  # - Decryptor code found.
  932.  
  933.     The file possibly contains a self-decryption routine. Some
  934.     copy-protected software is encrypted so this warning may appear for
  935.     some of your files. But if this warning appears in combination
  936.     with, for example, the 'T' warning, there could be a virus involved
  937.     and TbScan assumes the file is contaminated! Many viruses encrypt
  938.     themselves and cause this warning to be displayed.
  939.  
  940.   2.6.10.  V - Validated program
  941.  
  942.     The program has been validated to avoid false alarms.
  943.  
  944.     -   The design of this program would normally cause a false alarm
  945.         by the heuristic scan mode of TbScan.
  946.  
  947.     or:
  948.  
  949.     -   This program might change frequently, and the file is excluded
  950.         from integrity checking.
  951.  
  952.     These exclusions are stored in the Anti-Vir.Dat file by either
  953.     TbSetup (automatically) or by TbScan (manually).
  954.  
  955.   2.6.11.  E - Flexible Entry-point
  956.  
  957.     The program starts with a routine that determines the location of
  958.  
  959.  
  960.  
  961.                                     Page 14
  962.  
  963.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  964.  
  965.  
  966.     itself within the program file. This is rather suspicious because
  967.     sound programs have a fixed entry-point so they do not have to
  968.     determine this location. For viruses however this is quite common:
  969.     about 50% of the available viruses cause this flag to be displayed.
  970.  
  971.     The DOS FORMAT.COM program is an instance where this flag will be
  972.     displayed by TbScan. This cannot be avoided because Microsoft did
  973.     some strange things to this program. It appears that the file was
  974.     originally an .EXE file which has been converted into a .COM file
  975.     by adding a shell-like structure to it. (What is actually the
  976.     difference between infecting a file and converting it this way?)
  977.     Anyway, you should ignore this warning as to the DOS FORMAT
  978.     program.
  979.  
  980.   2.6.12.  L - program Load trap.
  981.  
  982.     The program might trap the execution of other software. If the
  983.     file also causes flag M (memory resident code) to be displayed, it
  984.     is very likely that the file is a resident program that determines
  985.     when another program is executed. A lot of viruses trap the program
  986.     load and use it to infect the program. Some anti-virus utilities
  987.     also trap the program load.
  988.  
  989.   2.6.13.  D - Direct disk access.
  990.  
  991.     This flag is displayed if the program being processed has
  992.     instructions near the entry-point to write to a disk directly. It
  993.     is quite normal that some disk-related utilities cause this flag
  994.     to be displayed. As usual, if many of your files (which have no
  995.     business writing directly to the disk) cause this flag to be
  996.     displayed, your system might be infected by an unknown virus.
  997.  
  998.     Note that a program that accesses the disk directly does not always
  999.     have to be marked by the 'D' flag. Only when the direct disk
  1000.     instructions are near the program entry point it will be reported
  1001.     by TbScan. If a virus is involved the harmful instructions are
  1002.     always near the entry point and that is the place where TbScan
  1003.     looks for them.
  1004.  
  1005.   2.6.14.  M - Memory resident code.
  1006.  
  1007.     TbScan has found instruction sequences which could cause the
  1008.     program to hook into important interrupts.  A lot of TSR (Terminate
  1009.     and Stay Resident) programs will trigger this flag, because
  1010.     hooking into interrupts is part of their usual behavior. However,
  1011.     if a lot of non-TSR programs cause this warning flag to appear, you
  1012.     should be suspicious. It is then likely that your files have been
  1013.     infected by a virus that remains resident in memory.
  1014.  
  1015.     Note that this warning does not appear with all true TSR programs.
  1016.     Nor can TSR detection in non-TSR programs always be relied upon.
  1017.  
  1018.  
  1019.  
  1020.  
  1021.                                     Page 15
  1022.  
  1023.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1024.  
  1025.  
  1026.   2.6.15.  ! - Invalid program.
  1027.  
  1028.     Invalid opcode (non-8088 instructions) or out-of-range branch.
  1029.  
  1030.     The program has either an entry point that has been located outside
  1031.     the body of the file, or reveals a chain of 'jumps' that can be
  1032.     traced to a location outside the program file.
  1033.  
  1034.     Another possibility is that the program contains invalid processor
  1035.     instructions.
  1036.  
  1037.     The program being checked is probably damaged, and cannot be
  1038.     executed in most cases. Anyway, TbScan does not take any risk and
  1039.     uses the 'scan' method to scan the file.
  1040.  
  1041.   2.6.16.  T - Invalid timestamp.
  1042.  
  1043.     The timestamp of the program is invalid: e.g. the number of seconds
  1044.     in the timestamp is illegal, or the date is illegal or later than
  1045.     the year 2000. This is suspicious because many viruses set the
  1046.     timestamp to an illegal value (like 62 seconds) to mark that they
  1047.     already infected the file, preventing themselves from infecting a
  1048.     file for a second time round. It is possible that the program being
  1049.     checked is contaminated with a virus that is still unknown,
  1050.     especially if many files on your system have an invalid timestamp.
  1051.     If only a very few programs have an invalid timestamp you'd better
  1052.     correct it and scan frequently to check that the timestamp of the
  1053.     files remain valid.
  1054.  
  1055.   2.6.17.  J - Suspicious jump construct.
  1056.  
  1057.     The program did not start at the program entry point. The code has
  1058.     jumped at least two times before reaching the final start-up code,
  1059.     or the program jumped using an indirect operand. Sound programs
  1060.     should not display this kind of strange behavior. If many files
  1061.     cause this warning to be displayed, you should investigate your
  1062.     system thoroughly.
  1063.  
  1064.   2.6.18.  ? - Inconsistent header.
  1065.  
  1066.     The program being processed has an exe-header that does not reflect
  1067.     the actual program lay-out. The DOS SORT.EXE program will cause
  1068.     this warning to be displayed, because the actual size of the
  1069.     program file is less than reported in the 'size-of-load module'
  1070.     field in the exe-header! Many viruses do not update the exe-header
  1071.     of an EXE file correctly after they have infected the file, so if
  1072.     this warning appears a lot it seems you have a problem. You should
  1073.     ignore this warning for the DOS SORT.EXE program. (Hopefully
  1074.     MicroSoft will correct the problem before the next release of DOS).
  1075.  
  1076.   2.6.19.  G - Garbage instructions.
  1077.  
  1078.  
  1079.  
  1080.  
  1081.                                     Page 16
  1082.  
  1083.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1084.  
  1085.  
  1086.     The program contains code that seems to have no purpose other than
  1087.     encryption or avoiding recognition by virus scanners. This flag is
  1088.     very important, in fact it is the only flag that will cause TbScan
  1089.     to report an infection without the presence of any other flags.  In
  1090.     most cases there will not be any other flags since the file is
  1091.     encrypted and the instructions are hidden from the scanner.  In a
  1092.     few cases this flag will appear for 'normal' files. These files
  1093.     however are badly designed and that is the reason the 'garbage'
  1094.     flag appears.
  1095.  
  1096.   2.6.20.  U - Undocumented system call.
  1097.  
  1098.     The program uses unknown DOS calls or interrupts. These unknown
  1099.     calls can be issued to invoke undocumented DOS features, or to
  1100.     communicate with an unknown driver in memory. Since a lot of
  1101.     viruses use undocumented DOS features, or communicate with memory
  1102.     resident parts of a previously loaded instance of the virus, it is
  1103.     suspicious if a program performs unknown or undocumented
  1104.     communications. However, it does not necessarily indicate a virus
  1105.     because some 'tricky' programs use undocumented features too.
  1106.  
  1107.   2.6.21.  Y - Invalid bootsector.
  1108.  
  1109.     The bootsector is not completely according to the IBM defined
  1110.     bootsector format. It is likely that the bootsector contains a
  1111.     virus or has been corrupted.
  1112.  
  1113.   2.6.22.  Z - EXE/COM determinator.
  1114.  
  1115.     The program seems to check whether a file is a COM or EXE type
  1116.     program. Infecting a COM file is a process that is not similar to
  1117.     infecting an EXE file, so viruses that are able to infect both
  1118.     program types should be able to distinguish between them.
  1119.  
  1120.     There are of course also innocent programs that need to find out
  1121.     whether a file is a COM or EXE file. Executable file compressors,
  1122.     EXE2COM converters, debuggers, and high-loaders are examples of
  1123.     programs that may contain a routine to distinguish between EXE and
  1124.     COM files.
  1125.  
  1126.   2.6.23.  O - code Overwrite.
  1127.  
  1128.     This flag will be displayed if TbScan detects that the program
  1129.     overwrites some of its own instructions. However, it does not seem
  1130.     to have a complete (de)cryptor routine.
  1131.  
  1132.   2.6.24.  B - Back to entry.
  1133.  
  1134.     The program seems to execute some code, and after that it jumps
  1135.     back to the entry-point of the program. Normally this would result
  1136.     in an endless loop, except when the program has also modified some
  1137.     of its instructions. This is quite common behavior for computer
  1138.  
  1139.  
  1140.  
  1141.                                     Page 17
  1142.  
  1143.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1144.  
  1145.  
  1146.     viruses. In combination with any other flag TbScan will report a
  1147.     virus.
  1148.  
  1149.   2.6.25.  K - Unusual stack.
  1150.  
  1151.     The EXE file being processed has an odd (instead of even) stack
  1152.     offset or a suspicious stack segment. Many viruses are quite buggy
  1153.     by setting up an illegal stack value.
  1154.  
  1155.   2.6.26.  p - Packed or compressed file.
  1156.  
  1157.     The program has been packed or compressed. There are some utilities
  1158.     that are able to compress a program file, like EXEPACK or PKLITE.
  1159.     If the file was infected after the file had been compressed, TbScan
  1160.     will be able to detect the virus. However, if the file had already
  1161.     been infected before it was compressed, the virus has also been
  1162.     compressed in the process, and a virus scanner might not be able to
  1163.     recognize the virus anymore.
  1164.  
  1165.     Fortunately, this does not happen a lot, but you should beware! A
  1166.     new program might look clean, but can turn out to be the carrier of
  1167.     a compressed virus. Other files in your system will then be
  1168.     infected too, and it is these infections that will be clearly
  1169.     visible to virus scanners.
  1170.  
  1171.   2.6.27.  w - Windows or OS/2 header.
  1172.  
  1173.     The program can be or is intended to be used in a Windows (or OS/2)
  1174.     environment. As yet TbScan does not offer a specialized scanning
  1175.     method for these files. Of course that will change as soon as
  1176.     Windows- or OS/2-specific viruses start occurring.
  1177.  
  1178.   2.6.28.  h - Hidden or System file.
  1179.  
  1180.     The file has the 'Hidden' or the 'System' file attribute set.  This
  1181.     means that the file is not visible in a DOS directory display but
  1182.     TbScan will scan it anyway. If you don't know the origin and/or
  1183.     purpose of this file, you might be dealing with a 'Trojan Horse' or
  1184.     a 'joke' virus program. Copy such a file onto a diskette; then
  1185.     remove it from it's program environment and check if the program
  1186.     concerned is missing the file. If a program does not miss it, you
  1187.     will have freed some disk space, and maybe you have saved your
  1188.     system from future disaster in the process.
  1189.  
  1190.   2.6.29.  i - Internal overlay.
  1191.  
  1192.     The program being processed has additional data or code behind the
  1193.     load-module as specified in the exe-header of the file. The program
  1194.     might have internal overlay(s), or configuration or debug
  1195.     information appended behind the load-module of the EXE file.
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.                                     Page 18
  1202.  
  1203.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1204.  
  1205.  
  1206.   2.7.  Program validation.
  1207.  
  1208.     This chapter only applies if you use TbSetup to generate the
  1209.     Anti-Vir.Dat records. Without these records program validation is
  1210.     not an option.
  1211.  
  1212.     TbScan will perform as intended on most programs. However, there
  1213.     are some programs that require special attention, in order to avoid
  1214.     false alarms. Most of these programs are recognized automatically
  1215.     by the TbSetup program. However, it is certainly possible that you
  1216.     have a few files on your system that meet the following criteria:
  1217.  
  1218.     1) Programs that trigger the heuristic alarm of TbScan.
  1219.     2) Programs that change frequently.
  1220.  
  1221.     If an 'infection' has been found with the heuristic analyzis or
  1222.     integrity checking only and if there is a Anti-Vir.Dat record
  1223.     available, TbScan offers an additional option in its virus-alert
  1224.     window:  'V)alidate program'.  If you are convinced that the
  1225.     indicated program does NOT contain a virus, you can press 'V' to
  1226.     set a flag in the program's record.  This makes it possible to
  1227.     avoid future false alarms.
  1228.  
  1229.     There are two validation modes: if the TbScan virus alarm is due
  1230.     to a file change, the validation applies to future file changes
  1231.     only, if the virus alarm is due to heuristic analysis, the
  1232.     validation only applies to heuristic results. When the file is
  1233.     exluded from heuristic analysis the file will still be checksummed,
  1234.     if the file is excluded from integrity checking TbScan will still
  1235.     perform heuristic analysis on that file.
  1236.  
  1237.     Note: if you replaced a file (software upgrade) and you did not use
  1238.     TbSetup, TbScan will pop-up its virus alert window to inform you
  1239.     about the file change. Do NOT select the validation option in this
  1240.     case, because this would exclude the file for future integrity
  1241.     checking. You had better abort TbScan and run TbSetup on the
  1242.     changed file(s).
  1243.  
  1244.  
  1245.   2.8.  Command line options
  1246.  
  1247.     It is possible to specify options on the command line. Tbscan
  1248.     recognizes option short-keys and option words. The words are easier
  1249.     to memorize, and they will be used in this manual for convenience.
  1250.  
  1251.     optionword  parameter short  explanation
  1252.     ----------  --------- ----- -------------------------------------
  1253.  
  1254.     help                    he  =help (-? = short help)
  1255.     pause                   pa  =enable 'Pause' prompt
  1256.     mono                    mo  =force monochrome
  1257.     quick                   qs  =quick scan (uses Anti-Vir.Dat)
  1258.  
  1259.  
  1260.  
  1261.                                     Page 19
  1262.  
  1263.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1264.  
  1265.  
  1266.     allfiles                af  =scan non-executable files too
  1267.     heuristic               hr  =enable heuristic alerts
  1268.     extract                 ex  =extract signature (registered only)
  1269.     once                    oo  =only once a day
  1270.     secure                  se  =user abort now allowed (reg. only)
  1271.     compat                  co  =maximum-compatibility mode
  1272.     ignofile                in  =ignore no-file-error
  1273.     noboot                  nb  =skip bootsector check
  1274.     nomem                   nm  =skip memory check
  1275.     hma                     hm  =force HMA scan
  1276.     nohmem                  nh  =skip UMB/HMA scan
  1277.     nosub                   ns  =skip sub-directories
  1278.     noautohr                na  =no auto heuristic level adjust
  1279.     repeat                  rp  =scan multiple diskettes
  1280.     batch                   ba  =batch mode. No user input
  1281.     delete                  de  =delete infected files
  1282.     move                    mv  =move infected files
  1283.     expertlog               el  =no heuristic descriptions in log
  1284.     log      [=<filename>]  lo  =append log file
  1285.     session  [=<filename>]  sl  =create session log file
  1286.     loglevel =<0..4>        ll  =set log level
  1287.     path     =<move-path>   mp  =set move-path
  1288.     rename   [=<ext-mask>]  rn  =rename infected files
  1289.     sigfile  [=<filename>]  sf  =signature file to be used
  1290.  
  1291.    2.8.1.  help (he)
  1292.  
  1293.     If you specify this option TbScan displays the contents of the
  1294.     TBSCAN.HLP file if it is available in the home directory of TbScan.
  1295.     If you specify the '?' option you will get the summarized help info
  1296.     as listed above.
  1297.  
  1298.    2.8.2.  pause (pa)
  1299.  
  1300.     When you enter option 'pause' TbScan will stop after it has checked
  1301.     the contents of one window.  This gives you the possibility to
  1302.     examine the results without having to consult a log file
  1303.     afterwards.
  1304.  
  1305.    2.8.3.  mono (mo)
  1306.  
  1307.     This option forces TbScan to refrain from using colors in the
  1308.     screen output. This might enhance the screen output on some LCD
  1309.     screens or color-emulating monochrome systems.
  1310.  
  1311.    2.8.4.  quick (qs)
  1312.  
  1313.     If you specify this option TbScan will use the Anti-Vir.Dat files
  1314.     to check for file changes since the last time only. If a file has
  1315.     been changed (CRC change) or is not yet listed in Anti-Vir.Dat it
  1316.     will be scanned.
  1317.  
  1318.  
  1319.  
  1320.  
  1321.                                     Page 20
  1322.  
  1323.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1324.  
  1325.  
  1326.    2.8.5.  allfiles (af)
  1327.  
  1328.     This option causes TbScan to scan non-executable files (files 
  1329.     without extension COM, EXE, SYS or BIN) too. If TbScan finds out 
  1330.     that such a file does not contain anything that can be executed by 
  1331.     the processor the file will be 'skipped'. Otherwise the file will 
  1332.     be searched for COM, EXE and SYS signatures. TbScan however will 
  1333.     not perform heuristic analysis on these files.
  1334.  
  1335.     Since viruses do not infect non-executable files it is not
  1336.     necessary to scan non-executable files too. We even recommend not
  1337.     to use this option unless you have a good reason to scan all files.
  1338.     Once again: a virus needs to be executed to perform what it is
  1339.     programmed to do, and since non-executable files will not be
  1340.     executed a virus in such a file can not do anything. For this
  1341.     reason viruses do not even try to infect such files.
  1342.  
  1343.    2.8.6.  heuristic (hr)
  1344.  
  1345.     TbScan always performs a heuristic scan on the files being
  1346.     processed. However, only if a file is very probably infected with a
  1347.     virus TbScan will report the file as being infected. If you use
  1348.     option 'heuristic' TbScan is somewhat more sensitive. In this mode
  1349.     90% of the new, unknown, viruses will be detected without any
  1350.     signature, but some false alarms may occur. Consult also chapter
  1351.     2.5 ('Heuristic scanning').
  1352.  
  1353.    2.8.7.  extract (ex)
  1354.  
  1355.     This option is available to registered users only. See the chapter
  1356.     'Defining a Signature' (4.4.) on how to use the option 'extract'.
  1357.  
  1358.    2.8.8.  once (oo)
  1359.  
  1360.     If you specify this option TbScan will 'remember' after its scan
  1361.     that is has been executed that day, and that it should not be run
  1362.     again the same day with this particular option set. This option is
  1363.     very useful if you incorporate it in your AUTOEXEC.BAT file in
  1364.     combination with a list file:
  1365.  
  1366.                 TbScan @Everyday.Lst once rename
  1367.  
  1368.     TbScan will now scan the list of files and/or paths specified in
  1369.     the file EVERYDAY.LST during the first boot-up of the day. If the
  1370.     systems boots more often that day, TbScan will then return to DOS
  1371.     immediately.  This option does not interfere with the regular use
  1372.     of TbScan. If you invoke TbScan without the 'once' option it will
  1373.     always run, regardless of a previous run with the 'once' option set.
  1374.  
  1375.     Note that TbScan 'once' will be executed regardless of regular
  1376.     TbScan sessions earlier that day.
  1377.  
  1378.  
  1379.  
  1380.  
  1381.                                     Page 21
  1382.  
  1383.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1384.  
  1385.  
  1386.     Also note that if TbScan cannot write to TBSCAN.EXE because it has
  1387.     been flagged 'read-only' or is located on a write-protected
  1388.     diskette, the 'once' option will fail and the scanner will run
  1389.     without it.
  1390.  
  1391.    2.8.9.  secure (se)
  1392.  
  1393.     This option is available to registered users only. If this option
  1394.     is specified it is no longer possible to cancel TbScan by pressing
  1395.     Ctrl-Break, or to respond to a virus alert window.
  1396.  
  1397.    2.8.10.  compat (co)
  1398.  
  1399.     If you specify this option, TbScan attempts to be more compatible
  1400.     with your system. Use this option if the program does not behave as
  1401.     can be expected or even halts the system. This option will slow
  1402.     down the scanning process so it should only be used when necessary.
  1403.     Note that option 'compat' does not affect the results of a scan.
  1404.  
  1405.    2.8.11.  ignofile (in)
  1406.  
  1407.     If this option is specified and no files can be found, TbScan will
  1408.     not display the 'no files found' message, nor does it exit with
  1409.     errorlevel 1. This option might be useful for automatic archive
  1410.     contents scanning. If the archive contains no executable files,
  1411.     TbScan will not return with an error condition.
  1412.  
  1413.    2.8.12.  noboot (nb)
  1414.  
  1415.     If you specify this option TbScan will not scan the bootsector.
  1416.  
  1417.    2.8.13.  nomem (nm)
  1418.  
  1419.     If you specify this option TbScan will not scan the memory of the
  1420.     PC for viruses.
  1421.  
  1422.    2.8.14.  hma (hm)
  1423.  
  1424.     TbScan detects the presence of an XMS-driver, and scans HMA
  1425.     automatically. If you have an HMA-driver that is not compatible
  1426.     with the XMS standard you can use the 'hma' option to force TbScan
  1427.     to scan HMA.
  1428.  
  1429.    2.8.15.  nohmem (nh)
  1430.  
  1431.     By default TbScan identifies RAM beyond the DOS limit and scans
  1432.     that too. This means that video memory and the current EMS pages
  1433.     are scanned by default. You can use the 'nohmem' option to disable
  1434.     the scanning of non-DOS memory.
  1435.  
  1436.    2.8.16.  nosub (ns)
  1437.  
  1438.  
  1439.  
  1440.  
  1441.                                     Page 22
  1442.  
  1443.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1444.  
  1445.  
  1446.     By default TbScan will search sub-directories for executable files,
  1447.     unless a filename (wildcards allowed!) has been specified. If you
  1448.     use this option, TbScan will not scan sub-directories.
  1449.  
  1450.    2.8.17.  noautohr (na)
  1451.  
  1452.     TbScan automatically adjusts the heuristic detection level after a
  1453.     virus has been found. This provides you maximum detection
  1454.     capabilities in case you need it, while the amount of false alarms
  1455.     due to heuristics remains small in normal situations. With other
  1456.     words:  as soon as a virus has been found, TbScan will anticipate
  1457.     and proceed as if option 'heuristic' has been specified. If you
  1458.     don't want this, you can specify option 'noautohr'.
  1459.  
  1460.    2.8.18.  delete (de)
  1461.  
  1462.     If TbScan detects a virus in a file it prompts the user to delete,
  1463.     move or rename the infected file, or to continue without action.
  1464.     If you specify the 'delete' option, TbScan will not ask the user
  1465.     what to do but will delete the infected file automatically. Use
  1466.     this option if you have established that your system has been
  1467.     infected.  Make sure that you have a clean back-up, and that you
  1468.     really want to get rid of all infected files at once.
  1469.  
  1470.    2.8.19.  rename (rn)
  1471.  
  1472.     If TbScan detects a file virus it prompts the user to delete, move
  1473.     or rename the infected file, or to continue without action. If you
  1474.     specify the 'rename' option, TbScan will not ask the user what to do
  1475.     but will rename the infected file automatically. By default, the
  1476.     first character of the file extension will be replaced by the
  1477.     character 'V'.  An .EXE file will be renamed to .VXE, and a .COM
  1478.     file to .VOM. This prevents the infected programs from being
  1479.     executed, spreading the infection. At the same time they can be
  1480.     kept for later examination and repair.
  1481.  
  1482.     You may also add a parameter to this option specifying the target
  1483.     extension.  This parameter should always contain 3 characters;
  1484.     question marks are allowed. The default target extension is 'V??'.
  1485.  
  1486.    2.8.20.  move (mv)
  1487.  
  1488.     If TbScan detects a virus in a file it prompts the user to delete,
  1489.     move or rename the infected file, or to continue without action. If
  1490.     you specify the 'move' option, TbScan will not ask the user what to
  1491.     do but will move the infected file to another directory
  1492.     automatically.
  1493.  
  1494.     The file will be moved to the TbScan directory or to the directory
  1495.     specified with option 'path'.
  1496.  
  1497.    2.8.21.  path (mp)
  1498.  
  1499.  
  1500.  
  1501.                                     Page 23
  1502.  
  1503.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1504.  
  1505.  
  1506.     This option can be used to specify the move-path. The move path is
  1507.     used to move an infected file if option -move is specified or when
  1508.     the user selects the M) in the virus alert window.
  1509.  
  1510.    2.8.22.  batch (ba)
  1511.  
  1512.     If TbScan detects a file virus it prompts the user to delete, move
  1513.     or rename the infected file, or to continue without action. If you
  1514.     specify the 'batch' option TbScan will always continue. This option
  1515.     is designed for use in a batch file that is executed without the
  1516.     user attending. We highly recommended you to use a log file in such
  1517.     situations, as a scanning operation does not make much sense
  1518.     without the return messages being read.
  1519.  
  1520.    2.8.23.  repeat (rp)
  1521.  
  1522.     This option is very useful if you want to check a large amount of
  1523.     diskettes. TbScan does not return to DOS after checking a disk, but
  1524.     it prompts you to insert another disk in the drive.
  1525.  
  1526.    2.8.24.  log (lo)
  1527.  
  1528.     When you use this option, TbScan creates a LOG-file.  The default
  1529.     filename is TBSCAN.LOG and it will be created in the current
  1530.     directory.  You may optionally specify a path and filename. The
  1531.     LOG-file lists all infected program files, specifying upper-case
  1532.     heuristic flags and complete pathnames. If the log file already
  1533.     exists, it will not be overwritten. Instead the new LOG-file will
  1534.     be appended to the existing one.
  1535.  
  1536.     If you use this option often, it is recommended to delete or
  1537.     truncate the log file every month to avoid unlimited growth.
  1538.  
  1539.     If you want to print the results, you can specify a printer device
  1540.     name rather than a filename (log=lpt1).
  1541.  
  1542.    2.8.25.  session (sl)
  1543.  
  1544.     This option is nearly identical to the 'log' option above. The
  1545.     difference is that if a log file already exists, the 'session'
  1546.     option will make sure that this will be overwritten by new log
  1547.     information.  Hence a log file created by the 'session' option will
  1548.     only contain information obtained from a single scanning session.
  1549.  
  1550.    2.8.26.  loglevel (ll)
  1551.  
  1552.     The 'loglevel' option determines which files will be put in the
  1553.     log file. There are five log levels:
  1554.         0       Log only infected files. If there are no infected files
  1555.                 do not create or change the log file.
  1556.         1       Put a summary and timestamp in the log file. Put only
  1557.                 infected files in the log file.
  1558.  
  1559.  
  1560.  
  1561.                                     Page 24
  1562.  
  1563.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1564.  
  1565.  
  1566.         2       Same as loglevel=2, but now also 'suspected' files are
  1567.                 logged. Suspected files are files that would trigger
  1568.                 the heuristic alarm if option 'heuristic' had been
  1569.                 specified.
  1570.         3       Same as loglevel=2, but all files that have a warning
  1571.                 character printed behind the filename will be logged
  1572.                 too.
  1573.         4       All files being processed will be put into the log
  1574.                 file.
  1575.  
  1576.     The default log level is 1.
  1577.  
  1578.     Note: you have to combine this option with option 'log' or
  1579.     'session'.
  1580.  
  1581.    2.8.27.  expertlog (el)
  1582.  
  1583.     If you specify this option TbScan will not display the descriptions
  1584.     of the heuristic flags into the log file.
  1585.  
  1586.  
  1587.   2.9.  Examples:
  1588.  
  1589.         TbScan c:\ noboot
  1590.             Process all executable files in the root directory and its
  1591.             sub-directories.  Skip the bootsector scan.
  1592.  
  1593.         TbScan \*.*
  1594.             Process all files in the root directory. Don't process
  1595.             sub-directories.
  1596.  
  1597.         TbScan c:\ log=c:\test.log loglevel=2
  1598.             All executable files on drive C: will be checked. A
  1599.             LOG file with the name c:\test.log will be created. The log
  1600.             file will contain all infected and suspected files.
  1601.  
  1602.         TbScan \ log=lpt1
  1603.             TbScan will scan the root directory and its 
  1604.             sub-directories. The results are redirected to the printer 
  1605.             rather than to a log file.
  1606.  
  1607.  
  1608.   2.10.  The configuration file
  1609.  
  1610.     Those people that are accustomed to the use of configuration files
  1611.     may devise a similar file for use with TbScan. The TbScan
  1612.     configuration file should be located in the same directory where
  1613.     the file TBSCAN.EXE resides, and it should be called TBS.BAT
  1614.     (surprise, surprise!). The format of this configuration file is as
  1615.     follows:
  1616.  
  1617.       tbscan %1 %2 %3 %4 %5 %6 %7 %8 %9 [<default options...>]
  1618.  
  1619.  
  1620.  
  1621.                                     Page 25
  1622.  
  1623.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1624.  
  1625.  
  1626.     Example:
  1627.  
  1628.       tbscan %1 %2 %3 %4 %5 %6 %7 %8 %9 log=c:\logfiles\tbscan.log ll=1
  1629.  
  1630.  
  1631.     To execute this configuration file you should type 'TBS C:\' at the
  1632.     DOS prompt. If you wish to override the default options specified
  1633.     in your TBS.BAT file, just type 'TBSCAN'.
  1634.  
  1635.     This configuration file can offer great possibilities. You may
  1636.     incorporate mnemonics like 'DAILY' and 'WEEKLY' to invoke a
  1637.     predefined scan session. The user may be allowed to specify
  1638.     additional options on the command line. You can make sure that if
  1639.     TbScan detects a virus, a file called VIRUS.TXT will be printed on
  1640.     the screen, offering a user important information such as the
  1641.     emergency phone number of the company helpdesk and the phone number
  1642.     of your security officer.
  1643.  
  1644.     An example:
  1645.       @echo off
  1646.       if '%1'=='daily' goto daily
  1647.       if '%1'=='weekly' goto weekly
  1648.       :help
  1649.       echo Type 'TBS weekly' or 'TBS daily' to start a scan event
  1650.       goto end
  1651.       :daily
  1652.       tbscan c:\system d:\ %2 %3 %4
  1653.       if errorlevel 2 goto virus
  1654.       if errorlevel 1 goto help
  1655.       goto end
  1656.       :weekly
  1657.       tbscan c:\ d:\ e:\ log=c:\logs\tbscan.log %2 %3 %4
  1658.       if errorlevel 2 goto virus
  1659.       if errorlevel 1 goto help
  1660.       goto end
  1661.       :virus
  1662.       type virus.txt
  1663.       :end
  1664.  
  1665.     For more information about setting up this kind of powerful
  1666.     'configuration' file please consult the chapter on batch files in
  1667.     your DOS manual.
  1668.  
  1669.     Too few people are aware of the power of the DOS batch file
  1670.     features.  Why learn yet another configuration file language if
  1671.     a DOS batch file will suit your needs perfectly? You can predefine
  1672.     scan sessions, define default options, and branch to a specific
  1673.     routine if TbScan detects a virus.
  1674.  
  1675.  
  1676.   2.11.  The TbScan.Lng file
  1677.  
  1678.  
  1679.  
  1680.  
  1681.                                     Page 26
  1682.  
  1683.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1684.  
  1685.  
  1686.     The TbScan.Lng file contains all texts being displayed by TbScan. 
  1687.     You can translate or customize the messages with any ASCII editor.
  1688.  
  1689.     The messages are separated by the dollar sign ($). The first 
  1690.     message displays our address and registration info. You can edit 
  1691.     this message as you please, for instance adding your company logo.
  1692.  
  1693.     You may add color codes to the TbScan.Lng file. A color code is
  1694.     preceeded by the character '|'. The following color codes are
  1695.     available: (all numbers are in hex).
  1696.     Color               Foreground      Highlight       Background
  1697.     Black               00              08              00
  1698.     Blue                01              09              10
  1699.     Green               02              0A              20
  1700.     Cyan                03              0B              30
  1701.     Red                 04              0C              40
  1702.     Magenta             05              0D              50
  1703.     Yellow/Brown        06              0E              60
  1704.     White/gray          07              0F              70
  1705.     Example:    To make a highligted green character on a red
  1706.     background the color code would be 0A+40=4A. To make the character
  1707.     blink add 80h to the result.
  1708.  
  1709.  
  1710.   2.12.  Error messages
  1711.  
  1712.     Error messages that might be displayed:
  1713.  
  1714.     +   Limit exceeded.
  1715.         The total amount of internal signature information exceeded
  1716.         64Kb. This message will be displayed if the number of
  1717.         signatures reaches 2500. You can either reduce the number of
  1718.         signatures or make them shorter.
  1719.  
  1720.     +   Command line error.
  1721.         An invalid or illegal command line option has been specified.
  1722.  
  1723.     +   No matching executable files found.
  1724.         The path specified does not exist, is empty, or the specified
  1725.         file does not exist or is not an executable file.
  1726.  
  1727.     +   Cannot create logfile.
  1728.         The specified log file path is illegal, the disk is full or
  1729.         write protected, or the file already exists and cannot be
  1730.         overwritten.
  1731.  
  1732.     +   Sanity check failed!
  1733.         TbScan detected that its internal checksum does not match
  1734.         anymore. TbScan is possibly contaminated by a virus.
  1735.         Obtain a clean copy of TbScan, put it on a WRITE PROTECTED
  1736.         bootable diskette, boot from that diskette, and try again!
  1737.  
  1738.  
  1739.  
  1740.  
  1741.                                     Page 27
  1742.  
  1743.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1744.  
  1745.  
  1746.   2.13.  Exit codes
  1747.  
  1748.     TbScan terminates with one of the following exit codes:
  1749.  
  1750.         Errorlevel 0:           no viruses found, no error occurred.
  1751.         Errorlevel 1:           some error occurred.
  1752.         Errorlevel 255:         sanity check failed.
  1753.         Errorlevel >1 and <128: one or more viruses detected.
  1754.  
  1755.     When a virus is detected the errorlevel is used as a bit field:
  1756.  
  1757.         bit 1 (02):             SYS file infected.
  1758.         bit 2 (04):             EXE file infected.
  1759.         bit 3 (08):             COM file infected.
  1760.         bit 4 (16):             virus found in LOW memory.
  1761.         bit 5 (32):             virus found in BOOTsector.
  1762.         bit 6 (64):             virus found in HIGH memory.
  1763.  
  1764.     An errorlevel of 26 means that a SYS, COM and LOW virus is found
  1765.     (26 = 02+08+16).
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.                                     Page 28
  1802.  
  1803.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1804.  
  1805.  
  1806. 3.  CONSIDERATIONS AND RECOMMENDATIONS
  1807.  
  1808.  
  1809.   3.1.  What should be scanned?
  1810.  
  1811.     In the early days of viruses, virus scanners just scanned
  1812.     everything. Today we know that this approach has serious
  1813.     disadvantages: the number of false alarms is very high, the scan
  1814.     speed is very, very slow, etc.
  1815.  
  1816.     Before we proceed, let's first establish some facts about viruses.
  1817.     A virus is just a program. Like any other program, it will have no
  1818.     effect as long as it is not executed. Consequently, data files like
  1819.     text files can never spread a virus. Of course, it is always
  1820.     possible to copy a virus into a .TXT file, but since the text file
  1821.     itself will never be executed, the virus can never be activated
  1822.     from that location.  A virus signature in a .TXT file is treated as
  1823.     just any other stream of bytes to be found there. A program and a
  1824.     bootsector, however, will be executed, and if they contain a
  1825.     virus, the virus will gain control and do its nasty job.
  1826.  
  1827.     We now know that it doesn't make sense to scan non-executable
  1828.     files. What we therefore need to scan are files with the extensions
  1829.     EXE COM OV? SYS and BIN. Note that a batch file (.BAT) is just a
  1830.     text file.  Though it can be 'executed' in some way, it is not
  1831.     possible to program a virus in the batch file language.
  1832.  
  1833.     What do executable programs consist of? Naturally they contain
  1834.     program code, but they also contain data. The texts that will be
  1835.     displayed on the screen by that program are just data. They will
  1836.     never be 'executed'. We don't have to scan them.
  1837.     The exe-header of an exe file does not contain any code either,
  1838.     only data. The exe-header is there to assist DOS in loading the
  1839.     program, and it is thrown away before DOS passes control to the
  1840.     program itself. We don't have to scan it.
  1841.     The same applies to the bytes following the load-module of the
  1842.     file. This area of a file will not be loaded into memory at
  1843.     start-up. We don't have to scan it.
  1844.  
  1845.     Unfortunately, the code part of the executable file is mostly the
  1846.     larger one. The code-data ratio differs for each program, but on an
  1847.     average we can state that about two thirds of a program consist of
  1848.     code. However, it is hardly possible to separate the two. Even the
  1849.     operating system is not able to do this, only the program itself.
  1850.     What actually happens is that when you execute a program, the
  1851.     operating system passes control to the program at a fixed location
  1852.     in the program file. This location, referred to as ENTRY-POINT in
  1853.     this manual, is the first byte in case of a .COM file, or a
  1854.     location specified in the exe-header of an .EXE file. This location
  1855.     is the only location in a file of which we can be 100% sure it
  1856.     contains code. As to other locations we can only guess.
  1857.  
  1858.  
  1859.  
  1860.  
  1861.                                     Page 29
  1862.  
  1863.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1864.  
  1865.  
  1866.     How does a virus work?
  1867.  
  1868.     A virus that is about to infect a file cannot just throw its viral
  1869.     code at a random location in that file, it won't work. The virus
  1870.     has to be sure that its code will be executed before the host
  1871.     program gains control. Why?  Because if the contaminated program
  1872.     finds itself altered, it will behave in an unexpected manner. If
  1873.     the program accesses internal resources that have been overwritten
  1874.     by the virus, the program will crash. Besides, how should the virus
  1875.     know whether that random location will ever be executed?
  1876.  
  1877.     There is only ONE location that will always be executed, and that
  1878.     is the entry-point of the program. To infect a file the virus has
  1879.     to attach itself to the entry-point and store the original
  1880.     instructions of the program at another location. Only there and
  1881.     then can the virus be certain it will gain control instead of the
  1882.     host program, and that it can restore the original instructions
  1883.     before it passes on control. All reports of virus infections of
  1884.     program files indicate that a virus ALWAYS attaches itself to the
  1885.     entry-point of a program.
  1886.  
  1887.     This leads us to a basic principle: if we scan the location where
  1888.     we can find the first instructions of the program, we can be
  1889.     certain we are scanning the area where the virus would reside.
  1890.     TbScan uses this knowledge when scanning a window of about 4Kb (as
  1891.     it does by default) around the program-entry point. This is called
  1892.     'Checking' or 'Looking'. If you wish to know more about this
  1893.     procedure consult chapter 6.2.: 'The Internals of TbScan'.
  1894.  
  1895.     Note that we do not take any risks when limiting the area where we
  1896.     scan for viruses. If their signatures are assembled according to
  1897.     the basic principles set out above, viruses cannot escape from
  1898.     detection, simply because they have to be in the 'window' where we
  1899.     scan for them.  To prove our point many other competitive virus
  1900.     scanners have adopted our scanning strategy.
  1901.  
  1902.     Also note that if TbScan is not completely sure about the exact
  1903.     location of the entry-point of the file, it scans ALL the program
  1904.     code of the file using the 'scan' algorithms.
  1905.  
  1906.  
  1907.   3.2.  The internals of TbScan
  1908.  
  1909.     3.2.1.  How is that blazing speed achieved?
  1910.  
  1911.         The speed of TbScan is achieved by many measures.
  1912.  
  1913.         To avoid false alarms, TbScan scans restricted areas of the
  1914.         file.  Naturally this approach benefits the scanning speed.
  1915.         Disk access is minimized, and not much data has to be
  1916.         searched.
  1917.  
  1918.  
  1919.  
  1920.  
  1921.                                     Page 30
  1922.  
  1923.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1924.  
  1925.  
  1926.         TbScan is entirely written in assembly language. High-level
  1927.         languages like Pascal and Basic have an enormous overhead which
  1928.         not only affects the size of the program but also reduces the
  1929.         execution speed.
  1930.  
  1931.         The search routine has been highly optimized. Every byte to be
  1932.         scanned is only accessed once, regardless of the number of
  1933.         signatures. Execution time will hardly increase when it has to
  1934.         scan for 3000 signatures instead of 500. The search algorithm
  1935.         used can be described as 'rotating semi-double 16-bits
  1936.         hashing'.
  1937.  
  1938.         The number of DOS function calls has been minimized. DOS is
  1939.         relatively slow, and access should be avoided as much as
  1940.         possible. In most cases TbScan even does not use DOS to access 
  1941.         the files to be scanned.
  1942.  
  1943.         TbScan writes directly to the screen instead of calling on DOS
  1944.         or BIOS to do this. Although TbScan has a scrolling window,
  1945.         screen access is minimized as much as possible without
  1946.         affecting the visual display of the program output.
  1947.  
  1948.     3.2.2.  The algorithms
  1949.  
  1950.         When TbScan processes a file it prints 'Looking', 'Checking',
  1951.         'Tracing', 'Scanning' or 'Skipping'.
  1952.  
  1953.       3.2.2.1.  Looking
  1954.  
  1955.         'Looking' means that TbScan has successfully located the entry
  1956.         point of the program in one step. The program code has been 
  1957.         identified so TbScan knows where to search without the need of 
  1958.         additional analysis.
  1959.  
  1960.         Looking will be used on most files produced by known software.
  1961.  
  1962.       3.2.2.2.  Checking
  1963.  
  1964.         'Checking' means that TbScan has successfully located the entry
  1965.         point of the program, and is scanning a frame of about 4Kb
  1966.         around the entry point. If the file is infected the signature
  1967.         of the virus will be in this area. 'Checking' is a very fast
  1968.         and reliable scan algorithm.
  1969.  
  1970.         Checking will be used on most files that are not produced by
  1971.         known software.
  1972.  
  1973.       3.2.2.3.  Tracing
  1974.  
  1975.         'Tracing' means that TbScan has successfully traced a chain of
  1976.         jumps or calls while locating the entry-point of the program,
  1977.         and is scanning a frame of about 4Kb around this location. If
  1978.  
  1979.  
  1980.  
  1981.                                     Page 31
  1982.  
  1983.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  1984.  
  1985.  
  1986.         the file has been infected, the signature of the virus will be
  1987.         in this area. 'Tracing' is a fast and reliable scan algorithm.
  1988.  
  1989.         Tracing will be primarily used for TSR-type COM files or Turbo
  1990.         Pascal-compiled programs. Most viruses will force TbScan to use
  1991.         'Tracing'.
  1992.  
  1993.       3.2.2.4.  Scanning
  1994.  
  1995.         'Scanning' means that TbScan is scanning the entire file
  1996.         (except for the exe-header which cannot contain any viral
  1997.         code). This algorithm will be used if 'Looking', 'Checking' or
  1998.         'Tracing' cannot be safely used. This is the case when the
  1999.         entry-point of the program contains other jumps and calls to
  2000.         code located outside the scanning frame, or when the heuristic 
  2001.         analyzer found something that should be investigated more 
  2002.         thoroughly.  'Scanning' is a slow algorithm.  Because it 
  2003.         processes almost the entire file, including data areas, false 
  2004.         alarms are more likely to occur.
  2005.  
  2006.         The 'Scanning' algorithm will be used while scanning
  2007.         bootsectors, SYS and BIN files.
  2008.  
  2009.       3.2.2.5.  Skipping
  2010.  
  2011.         'Skipping' will occur with SYS and OVL files only. It simply
  2012.         means that the file will not be scanned. As there are many SYS
  2013.         files that contain no code at all (like CONFIG.SYS) it makes
  2014.         absolutely no sense to scan these files for viruses.
  2015.  
  2016.         The same applies to .OV? files. Many overlay files do not
  2017.         deserve to be called as such as they lack an exe-header. Such
  2018.         files cannot be invoked through DOS making them just as
  2019.         invulnerable to direct virus attacks as .TXT files are. If a
  2020.         virus is reported to have infected an .OV? file, it involved
  2021.         one of the relatively few overlay files that does contain an
  2022.         exe-header. The infection was then the result of the virus
  2023.         monitoring the DOS exec-call (function 4Bh) and infecting any
  2024.         program being invoked that way, including 'real' overlay files.
  2025.  
  2026.  
  2027.   3.3.  The Sanity check
  2028.  
  2029.     TbScan performs a sanity check when it fires up. However, to be
  2030.     honest, it is NOT possible to make software 100% virus-resistant.
  2031.     If this was the case, the virus problem could be solved simply by
  2032.     incorporating a self-check in every program.
  2033.  
  2034.     Unfortunately, a sanity check does not work if a 'stealth' type of
  2035.     virus is involved. A stealth virus can hide itself completely when
  2036.     a self-check is being performed. Do note that we are not dealing
  2037.     with a TbScan bug here. The failure to detect stealth viruses is
  2038.  
  2039.  
  2040.  
  2041.                                     Page 32
  2042.  
  2043.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  2044.  
  2045.  
  2046.     common to ALL software performing a sanity check. Therefore, we
  2047.     recommend you to keep a clean version of TbScan on a
  2048.     write-protected diskette. Use this diskette to check other machines
  2049.     once you have found a virus in your own system.
  2050.  
  2051.  
  2052.   3.4.  How many viruses does it detect?
  2053.  
  2054.     Some people think that TbScan recognizes only 500 viruses, based
  2055.     upon the fact that the signature file contains only 500 signatures.
  2056.     What they do not realize is that the signatures are family
  2057.     signatures, which means that each signature covers many viruses.
  2058.     For instance, our PLO/Jerusalem signature detects over 100 viruses
  2059.     which are all related to the 'original' Jerusalem virus! Only one
  2060.     (wildcarded) signature is needed by TbScan to cover all these
  2061.     mutants.
  2062.  
  2063.     Some competitive products treat each virus mutant as a separate
  2064.     virus, and so claim to detect over 2000 viruses. However, TbScan
  2065.     detects even more viruses using 'only' 500 signatures.
  2066.  
  2067.  
  2068.   3.5.  Testing the scanner
  2069.  
  2070.     Many people understandably wish to test the product they are using.
  2071.     While it is very easy to test, for instance, a word processor, it
  2072.     is very difficult to test a smart scanner like TbScan. You cannot
  2073.     extract 25 bytes from an executable and insert it in the TBSCAN.DAT
  2074.     or VIRSCAN.DAT data file as a bogus signature just to find out
  2075.     whether or not TbScan will detect the 'signature' in the file it
  2076.     was copied from.  It is very likely that TbScan does NOT find it
  2077.     because it only scans the entry-area of the file whereas the
  2078.     'signature' you extracted might be taken from some other location
  2079.     within the file.
  2080.  
  2081.     You might ask: 'How then can I test the scanner if using a 'test
  2082.     signature' does not work?' We think you can't, unless you are an
  2083.     experienced assembler programmer.  Sorry, but testing a
  2084.     disassembling scanner should be performed by virus experts only.
  2085.     Fortunately, you don't have to rely on our tests solely.  There are
  2086.     anti-virus magazines that regularly publish tests of all virus
  2087.     scanners.  At the end of this manual you will find names and
  2088.     addresses of such magazines.  Anyway, third parties have tested our
  2089.     scanner along with several others, and they found TbScan to have a
  2090.     very high hit rate. It detects even more viruses than many popular
  2091.     scanners do.
  2092.  
  2093.  
  2094.   3.6.  Scan scheduling
  2095.  
  2096.     It is highly advisable to devise your own schedule for a regular
  2097.     scan of your system. Creation of a special TbScan boot diskette is
  2098.  
  2099.  
  2100.  
  2101.                                     Page 33
  2102.  
  2103.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  2104.  
  2105.  
  2106.     highly recommended in this respect.
  2107.  
  2108.     Boot from your original DOS diskette. Use the diskcopy command to
  2109.     copy the DOS diskette onto a new diskette. Delete all files from
  2110.     this diskette, except for the two hidden system files and
  2111.     COMMAND.COM.  Copy all TbScan files to the diskette. Create a new
  2112.     AUTOEXEC.BAT file which should contain the line 'TbScan C:\'.
  2113.     Write-protect the diskette with the write-protect tab.
  2114.  
  2115.     The following scan sessions (listed in order of preference) are
  2116.     recommended:
  2117.  
  2118.     -   Run TbScan from A WRITE-PROTECTED BOOTABLE DISKETTE once a
  2119.         week. Boot from this diskette before invoking the scanner. We
  2120.         agree that it may be inconvenient to boot from a diskette, but
  2121.         it is the only way to make sure that no stealth virus will
  2122.         become resident in memory.
  2123.  
  2124.     -   It is recommended to invoke a daily scan. You can invoke
  2125.         TbScan with the 'once' option from within the autoexec.bat file
  2126.         to perform the daily scan session automatically.  It is not
  2127.         necessary to boot from the bootable TbScan diskette to perform
  2128.         the daily scan.
  2129.  
  2130.  
  2131.   3.7.  Compressed files
  2132.  
  2133.     Many executable files are compressed or packed. They contain an
  2134.     unpacking routine which unpacks the executable in memory to restore
  2135.     the original program size. The simplest compressor is the Microsoft
  2136.     ExePack program. This compressor is even included in the link
  2137.     program itself (use the /E option while linking to pack the
  2138.     executable).
  2139.  
  2140.     If the program contained a virus BEFORE compression took place, the
  2141.     virus has been compressed too. A scanner will not recognize the
  2142.     virus because of its compressed signature. The virus will still be
  2143.     able to execute though.
  2144.  
  2145.     If a virus resides inside a compressed file, it betrays its
  2146.     presence by infecting other files in your system. Hence the
  2147.     signature will be visible in all the newly infected files, which
  2148.     the scanner will dutifully report. The compressed file that brought
  2149.     the (compressed) virus into your system will probably not trigger
  2150.     an alarm itself. The virus inside this program can do its worst all
  2151.     over again unless you isolate this compressed file as the source of
  2152.     the infection.
  2153.  
  2154.     TbScan displays a 'p' behind each file that it finds to be
  2155.     compressed by ExePack or any other compressor. TbScan does not
  2156.     unpack files, since too many files are compressed nowadays.
  2157.     Decompressing each one of them in your system would only be
  2158.  
  2159.  
  2160.  
  2161.                                     Page 34
  2162.  
  2163.  Thunderbyte virus detector. (C) Copyright 1989-1993 Thunderbyte B.V.
  2164.  
  2165.  
  2166.     feasible if there was a limited number of compression schemes. Even
  2167.     if there were, TbScan unpacking all your compressed files would be
  2168.     consuming too much time, the more so as most of the time this
  2169.     action would be quite unnecessary. Once you have established that a
  2170.     compressed file does not contain a virus, you can rest assured that
  2171.     this file will not get internally infected at a later date. Hence
  2172.     it makes no sense to have TbScan unpack these files time and time
  2173.     again. If there wasn't a virus the first time you checked, there
  2174.     will not be one at subsequent times.
  2175.  
  2176.     Note that if the compressed file gets infected AFTER it has been
  2177.     compressed, the virus has NOT been compressed and will be clearly
  2178.     visible to a scanner. The problem we referred to above only exists
  2179.     when a file has been infected first and compressed afterwards.
  2180.  
  2181.     Fortunately, you can treat compression as a minor risk when files
  2182.     have been compressed by the programmer of the product (as is often
  2183.     the case). Most programmers are aware of the existence of viruses
  2184.     and go about compression with great care. If the programmer did not
  2185.     compress the file, well, then the file has not been compressed and
  2186.     the problem does not exist at all,...that is, if you obtained the
  2187.     original version of a program of course.
  2188.  
  2189.     If you obtained your copy of the program from another copy, you
  2190.     have joined ranks with those that use illegal (!) copies of
  2191.     software and thereby take great risks! One of the previous owners
  2192.     of the program may have compressed it, treating you (perhaps
  2193.     unknowingly) to a nasty virus infection.
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.                                     Page 35